﻿using System.Diagnostics;

public sealed class NStopwatch
{
    private static string m_Tag;
    private static readonly Stopwatch m_Stopwatch = new();

    public static void Start(string tag)
    {
        m_Tag = tag;
        m_Stopwatch.Start();
    }

    public static void Stop()
    {
        m_Stopwatch.Stop();
        NDebug.Log($"[stopwatch]: {m_Tag} {m_Stopwatch.ElapsedMilliseconds}ms");
    }
}